f466e0
@@ -48,6 +48,7 @@
 import org.apache.commons.exec.ExecuteException;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.apache.hadoop.hive.shims.ShimLoader;
 import org.apache.hadoop.security.UserGroupInformation;
 import org.apache.hadoop.security.authentication.client.PseudoAuthenticator;
 import org.apache.hive.hcatalog.templeton.LauncherDelegator.JobType;
@@ -1155,5 +1156,8 @@
private static String getRequestingHost(String requestingUser, HttpServletReques
   private void checkEnableLogPrerequisite(boolean enablelog, String statusdir) throws BadParam {
     if (enablelog && !TempletonUtils.isset(statusdir))
       throw new BadParam("enablelog is only applicable when statusdir is set");
+    if(enablelog && "0.23".equalsIgnoreCase(ShimLoader.getMajorVersion())) {
+      throw new BadParam("enablelog=true is only supported with Hadoop 1.x");
+    }
   }
 }
